#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:homework5_1.py
# author:wmf
# datetime:2021/4/14 19:39
# software: PyCharm
'''
this is function description
'''
# import module your need

# 1  编写一个装饰器，能计算其他函数的运行时间；


import time


def get_time(func):
    def inner():
        start_time = time.time()
        func()
        end_time = time.time()
        print("运行时间为:%s" % (end_time - start_time))
    return inner


def index():
    time.sleep(5)


index = get_time(index)
index()
